package com.hl.shifangzhiyu.service.Impl;

import com.hl.shifangzhiyu.mapper.ConsultationRecordMapper;
import com.hl.shifangzhiyu.pojo.ConsultationRecord;
import com.hl.shifangzhiyu.pojo.ConsultationRecordDTO;
import com.hl.shifangzhiyu.service.ConsultationRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class ConsultationRecordServiceImpl implements ConsultationRecordService {
    @Autowired
    private ConsultationRecordMapper consultationRecordMapper;

    @Override
    public List<ConsultationRecordDTO> getRecordsByUserId(Integer userId) {
        return consultationRecordMapper.findByUserId(userId);
    }

    @Override
    public boolean updateEvaluateStatus(Integer id, Integer evaluateStatus) {
        return consultationRecordMapper.updateEvaluateStatus(id, evaluateStatus) > 0;
    }
}

